package com.zhongkeruan.order.hystrix;

import com.zhongkeruan.common.model.Product;
import com.zhongkeruan.common.vo.Result;
import com.zhongkeruan.order.hystrix.impl.ProductHystrixImpl;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * @author yangyao
 * @Description: ProductHystrix
 * @date 2019/1/16 11:47
 */
@FeignClient(value = "PROVIDER-PRODUCT",fallback = ProductHystrixImpl.class)
public interface ProductHystrix {

    @PostMapping("/products")
    public Result addProduct(@RequestBody Product product);
}
